package com.peter.design.pattern.factory.factorymethod;

/**
 * @Auther: 肖冬
 * @Date: 2020/7/22 20:23
 * @Description: 客户端调用
 */
public class Client {
    public static void main(String[] args) {
        LightFactory creator = new BuldLightFactory();
        Light light = creator.createLight();
        light.turnOn();
        light.turnOff();

        creator = new TubeLightFactory();
        light = creator.createLight();
        light.turnOn();
        light.turnOff();
    }
}
